<?php
class material_finder_material_basic{
    
    var $column_edit = '操作';
    var $column_edit_width = "75";
    function column_edit($row){
        if($_GET['ctl'] == 'admin_material_basic' && $_GET['act'] == 'index'){
            return '<a href="index.php?app=material&ctl=admin_material_basic&act=edit&p[0]='.$row['bm_id'].'&finder_id='.$_GET[_finder][finder_id].'" target="_blank">编辑</a>';
        }else{
            return '-';
        }
    }

    var $column_use_expire='保质期监控';
    var $column_use_expire_width = "75";
    function column_use_expire($row){
        $basicMaterialConfObj = app::get('material')->model('basic_material_conf');
        $tmp_bm_id = $row['bm_id'];
        $bm_conf = $basicMaterialConfObj->getList('use_expire',array('bm_id'=>$tmp_bm_id));
        if($bm_conf[0]['use_expire'] == 1){
            return '开启';
        }else{
            return '关闭';
        }
    }
}
